<template>
  <div class="home-container">
    <h1>欢迎来到我的主页</h1>
    <div class="button-container">
      <button class="nav-button" @click="navigateToProfile">个人简介</button>
      <button class="nav-button" @click="navigateToTodo">待办事项</button>
      <button class="nav-button" @click="navigateToRepo">项目仓库</button>
      <button class="nav-button" @click="navigateToGallery">图片展示</button>
    </div>
  </div>
</template>

<script setup>
import '../styles/home.css'
import { useRouter } from 'vue-router'

const router = useRouter()

const navigateToProfile = () => {
  router.push('/profile')
}

const navigateToTodo = () => {
  router.push('/todo')
}

const navigateToRepo = () => {
  window.open('https://gitee.com/rran99/001', '_blank')
}

const navigateToGallery = () => {
  router.push('/gallery')
}
</script>